/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author julio
 */
@Entity
@Table(name = "fare_rules")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FareRules.findAll", query = "SELECT f FROM FareRules f"),
    @NamedQuery(name = "FareRules.findByFureRulesId", query = "SELECT f FROM FareRules f WHERE f.fureRulesId = :fureRulesId"),
    @NamedQuery(name = "FareRules.findByFareId", query = "SELECT f FROM FareRules f WHERE f.fareId = :fareId"),
    @NamedQuery(name = "FareRules.findByRouteId", query = "SELECT f FROM FareRules f WHERE f.routeId = :routeId"),
    @NamedQuery(name = "FareRules.findByOriginId", query = "SELECT f FROM FareRules f WHERE f.originId = :originId"),
    @NamedQuery(name = "FareRules.findByDestinationId", query = "SELECT f FROM FareRules f WHERE f.destinationId = :destinationId"),
    @NamedQuery(name = "FareRules.findByContainsId", query = "SELECT f FROM FareRules f WHERE f.containsId = :containsId")})
public class FareRules implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "fure_rules_id")
    private Integer fureRulesId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "fare_id")
    private String fareId;
    @Size(max = 45)
    @Column(name = "route_id")
    private String routeId;
    @Size(max = 45)
    @Column(name = "origin_id")
    private String originId;
    @Size(max = 45)
    @Column(name = "destination_id")
    private String destinationId;
    @Size(max = 45)
    @Column(name = "contains_id")
    private String containsId;

    public FareRules() {
    }

    public FareRules(Integer fureRulesId) {
        this.fureRulesId = fureRulesId;
    }

    public FareRules(Integer fureRulesId, String fareId) {
        this.fureRulesId = fureRulesId;
        this.fareId = fareId;
    }

    public Integer getFureRulesId() {
        return fureRulesId;
    }

    public void setFureRulesId(Integer fureRulesId) {
        this.fureRulesId = fureRulesId;
    }

    public String getFareId() {
        return fareId;
    }

    public void setFareId(String fareId) {
        this.fareId = fareId;
    }

    public String getRouteId() {
        return routeId;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getOriginId() {
        return originId;
    }

    public void setOriginId(String originId) {
        this.originId = originId;
    }

    public String getDestinationId() {
        return destinationId;
    }

    public void setDestinationId(String destinationId) {
        this.destinationId = destinationId;
    }

    public String getContainsId() {
        return containsId;
    }

    public void setContainsId(String containsId) {
        this.containsId = containsId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fureRulesId != null ? fureRulesId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FareRules)) {
            return false;
        }
        FareRules other = (FareRules) object;
        if ((this.fureRulesId == null && other.fureRulesId != null) || (this.fureRulesId != null && !this.fureRulesId.equals(other.fureRulesId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.FareRules[ fureRulesId=" + fureRulesId + " ]";
    }
    
}
